﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace jaysJourney_v01.Utils.Blocks.Interactive.Types
{
    class DissolvingBlock : InteractiveBlock
    {
        /**
         * MEMBER VARIABLES
         * */

        int removeCounter = 750;

        /**
         * METHODS
         * */

        // Constructor

        public DissolvingBlock(SpriteBatch parent, Vector2 position, Vector2 size, SpriteAnimator idleAnimation, SpriteAnimator triggerAnimation) : base(parent, position, size, idleAnimation, triggerAnimation)
        {

        }

        // MAIN UPDATE

        public override void update(GameTime gametime)
        {
            if (isTriggered)
            {
                removeCounter -= gametime.ElapsedGameTime.Milliseconds;

                if (removeCounter <= 0)
                {
                    this.toRemove = true;
                }
            }
        }

        // MAIN DRAW

        public override void draw(GameTime gametime){}

        // TRIGGER

        public override void trigger(){}
    }
}